package com.cardrive.entity;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;

public class Axis {

	private Tire leftTire;
	private Tire rightTire;

	public Axis(Context context, int x, int y, int width) {
		leftTire = new Tire(context, x - width / 2, y);
		rightTire = new Tire(context, x + width / 2, y);
	}

	public void turnLeft(double angle) {
		leftTire.turnLeft(angle);
		rightTire.turnLeft(angle);
	}

	public void turnRight(double angle) {
		leftTire.turnRight(angle);
		rightTire.turnRight(angle);
	}

	public void render(Canvas canvas, Paint paint) {
		leftTire.render(canvas, paint);
		rightTire.render(canvas, paint);
	}

	public Tire getLeftTire() {
		return leftTire;
	}

	public void setLeftTire(Tire leftTire) {
		this.leftTire = leftTire;
	}

	public Tire getRigthTire() {
		return rightTire;
	}

	public void setRigthTire(Tire rigthTire) {
		this.rightTire = rigthTire;
	}

}
